{"ast":null,"code":"import _regeneratorRuntime from\"/Users/poppie/Desktop/development/messenger/app/frontend/node_modules/@babel/runtime/helpers/esm/regeneratorRuntime.js\";import _asyncToGenerator from\"/Users/poppie/Desktop/development/messenger/app/frontend/node_modules/@babel/runtime/helpers/esm/asyncToGenerator.js\";import _classCallCheck from\"/Users/poppie/Desktop/development/messenger/app/frontend/node_modules/@babel/runtime/helpers/esm/classCallCheck.js\";import _createClass from\"/Users/poppie/Desktop/development/messenger/app/frontend/node_modules/@babel/runtime/helpers/esm/createClass.js\";import apiClient from\"../http\";import{signIn as _signIn,signUp as _signUp,forgotPassword as _forgotPassword}from\"../routes\";var AuthService=/*#__PURE__*/function(){function AuthService(){_classCallCheck(this,AuthService);}_createClass(AuthService,null,[{key:\"signIn\",value:function(){var _signIn2=_asyncToGenerator(/*#__PURE__*/_regeneratorRuntime().mark(function _callee(signInRequest){return _regeneratorRuntime().wrap(function _callee$(_context){while(1){switch(_context.prev=_context.next){case 0:return _context.abrupt(\"return\",apiClient.post(_signIn(),signInRequest));case 1:case\"end\":return _context.stop();}}},_callee);}));function signIn(_x){return _signIn2.apply(this,arguments);}return signIn;}()},{key:\"signUp\",value:function(){var _signUp2=_asyncToGenerator(/*#__PURE__*/_regeneratorRuntime().mark(function _callee2(signUpRequest){return _regeneratorRuntime().wrap(function _callee2$(_context2){while(1){switch(_context2.prev=_context2.next){case 0:return _context2.abrupt(\"return\",apiClient.post(_signUp(),signUpRequest));case 1:case\"end\":return _context2.stop();}}},_callee2);}));function signUp(_x2){return _signUp2.apply(this,arguments);}return signUp;}()},{key:\"forgotPassword\",value:function(){var _forgotPassword2=_asyncToGenerator(/*#__PURE__*/_regeneratorRuntime().mark(function _callee3(forgotPasswordRequest){return _regeneratorRuntime().wrap(function _callee3$(_context3){while(1){switch(_context3.prev=_context3.next){case 0:return _context3.abrupt(\"return\",apiClient.post(_forgotPassword(),forgotPasswordRequest));case 1:case\"end\":return _context3.stop();}}},_callee3);}));function forgotPassword(_x3){return _forgotPassword2.apply(this,arguments);}return forgotPassword;}()}]);return AuthService;}();export{AuthService as default};","map":{"version":3,"names":["apiClient","signIn","signUp","forgotPassword","AuthService","signInRequest","post","signUpRequest","forgotPasswordRequest"],"sources":["/Users/poppie/Desktop/development/messenger/app/frontend/src/services/AuthService.ts"],"sourcesContent":["import SignInRequest from \"../models/request/SignInRequest\";\nimport SignUpRequest from \"../models/request/SignUpRequest\";\nimport ForgotPasswordRequest from \"../models/request/ForgotPasswordRequest\";\nimport ForgotPasswordResponse from \"../models/response/ForgotPasswordResponse\";\nimport apiClient from \"../http\";\nimport {AxiosResponse} from 'axios';\nimport {AuthResponse} from \"../models/response/AuthResponse\";\nimport {signIn, signUp, forgotPassword} from \"../routes\"\n\nexport default class AuthService {\n    public static async signIn(signInRequest: SignInRequest): Promise<AxiosResponse<AuthResponse>> {\n        return apiClient.post<AuthResponse>(signIn(), signInRequest);\n    }\n\n    public static async signUp(signUpRequest: SignUpRequest): Promise<AxiosResponse<AuthResponse>> {\n        return apiClient.post<AuthResponse>(signUp(), signUpRequest);\n    }\n\n    public static async forgotPassword(forgotPasswordRequest: ForgotPasswordRequest): Promise<AxiosResponse<ForgotPasswordResponse>> {\n        return apiClient.post<ForgotPasswordResponse>(forgotPassword(), forgotPasswordRequest);\n    }\n}"],"mappings":"skBAIA,MAAOA,UAAS,KAAM,SAAS,CAG/B,OAAQC,MAAM,GAANA,QAAM,CAAEC,MAAM,GAANA,QAAM,CAAEC,cAAc,GAAdA,gBAAc,KAAO,WAAW,IAEnCC,YAAW,wNAC5B,iBAA2BC,aAA4B,oJAC5CL,SAAS,CAACM,IAAI,CAAeL,OAAM,EAAE,CAAEI,aAAa,CAAC,wDAC/D,uLAED,kBAA2BE,aAA4B,yJAC5CP,SAAS,CAACM,IAAI,CAAeJ,OAAM,EAAE,CAAEK,aAAa,CAAC,0DAC/D,wMAED,kBAAmCC,qBAA4C,yJACpER,SAAS,CAACM,IAAI,CAAyBH,eAAc,EAAE,CAAEK,qBAAqB,CAAC,0DACzF,0IAXgBJ,WAAW"},"metadata":{},"sourceType":"module"}